
from .global_canvas import canvas


def putpixel(x, y, b, g, r):
    canvas[y % 600, x % 800] = (b, g, r)


def draw_dot(x, y, c_):
    canvas[y % 600, x % 800] = c_

def draw_horizon(x, y, length, c_):
    ystatic = y % 600
    for px in range(x, x+length):
        canvas[ystatic, px % 800] = c_

def draw_vertical(x, y, length, c_):
    xstatic = x % 600
    for py in range(y, y+length):
        canvas[py % 600, xstatic] = c_


def draw_array(x, y, arr):
    h, w = arr.shape[:2]
    arr = arr[:, :, :3]
    canvas[y:y+h, x:x+w, :] = arr[:,:,:]




